package com.yunfeng.web.task;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;


@Component
public class PrintTasj {

    //每个小时执行一次
//    @Scheduled(cron = "0 0 0-23 * * ? ")
    @Scheduled(cron = "30/59 * * * * ? ")
    public void cron(){
        System.out.println("执行测试Cron时间：" + new Date(System.currentTimeMillis()));
        //定时发送短信
//        SmsDemo.SendMsg();
    }
}
